package com.qst.survey.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import com.qst.survey.enums.TypeEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.web.servlet.view.InternalResourceViewResolver;

import java.util.ArrayList;
import java.util.Date;

/**
 * @Date: 2021/3/18 13:50
 * @Description: 问卷实体类
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("question")
public class Question {
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;  //问卷id

    private Integer userId; //用户id

    private String theme;  //题目

    private Integer isDemo;  //是否为模板

    private String content; //问卷描述

    private Integer isOver;  //是否结束

    private Integer type;  //问卷类型

    private String fileSrc; //封面问卷地址

    private Integer count;//回复人数

    private Integer heatDegree;//问卷热度

    @TableField(exist = false)
    private String msg;  //类型(中文名)

    private Date overTime;  //结束时间

    private Integer topicNumb; //题目数量

    @TableField(fill = FieldFill.INSERT)
    private Date createTime;  //创建时间

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;  //更新时间

    @TableLogic
    private Integer deleted;  //逻辑删除

    @TableField(exist = false)
    private ArrayList<QuestionTopic> topics=new ArrayList<>();
}
